import { appLocalStorage } from "magic-ui-react"
import { redirect } from "react-router-dom"

export const loginStatus = () => {
  return !!appLocalStorage.getValue('token')
}

export const logout = () => {
  appLocalStorage.setValue('token', '')
  window.open('/', '_self')
}